package com.mengmeng.demo.service.impl;

import com.mengmeng.demo.mapper.UserMapper;
import com.mengmeng.demo.user.user;
import com.mengmeng.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

// 接口实现类
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper worldMapper;



    @Override
    public List<user> getAll() {
        return worldMapper.getAll();
    }

    @Override
    public boolean delete(Integer id) {
        return worldMapper.deleteById(id);
    }

    @Override
    public boolean update(user world) {
        return worldMapper.update(world);
    }

    @Override
    public boolean inserte(user world) {
        return worldMapper.insert(world);
    }

    @Override
    public List<user> getById(int id) {
        return worldMapper.getById(id);
    }
}
